﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BankSystem
{
    internal class CredirAccount : Account
    {
        private int _line_of_credit;
        public CredirAccount(string accountNumber, string password) : base(accountNumber, password)
        {
            LineOfCredit = 0;
        }


        public int LineOfCredit
        {
            get => _line_of_credit;
            set => _line_of_credit = value;
        }

        public String CreditInfo()
        {
            return "账号" + AccountNumber + "的信用额度是：" + LineOfCredit;
        }

        new public String AccountInfo()
        {
            return "该账号是信用账号，账号是 " + AccountNumber + "\n" +
                "余额为：" + Balance;
        }


        public override string foo()
        {
            return "子类中override了foo函数";
        }
    }
}
